<template>
    <view class="detail-item card-cell">
        <view class="top">
            <text class="type" v-if="data.TypeName">{{ data.TypeName }}</text>
            <text class="price-text" :class="{ colorred: data.Money < 0 }">{{ data.Money }}{{moneyType==1?'':'元'}}</text>
        </view>
        <view class="center">
            <text class="time">时间:{{ data.AddTime }}</text>
            <text>结存:{{ data.Balance }}</text>
        </view>
        <view class="bottom">
            <text>说明:{{ data.Remark }}</text>
        </view>
    </view>
</template>

<script>
export default {
    props: {
        data: {
            type: Object,
            default: {},
        },
		moneyType:{
			type:String,
			default:'2'
		}
    },
    data() {
        return {}
    },
    mounted() {},
    methods: {},
}
</script>

<style lang="scss">
.detail-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-bottom: 20rpx;
    align-items: flex-start;
    .top {
        width: 100%;
        display: flex;
        flex: 1;
        flex-direction: row;
        margin-bottom: 20rpx;
        .type {
            display: flex;
            flex: 1;
        }
    }
    .center {
        width: 100%;
        display: flex;
        flex: 1;
        flex-direction: row;
        margin-bottom: 20rpx;
        text {
            color: $app-color-text-tip;
        }
        .time {
            flex: 1;
        }
    }
    .bottom {
        text {
            color: $app-color-text-tip;
        }
    }
}
.colorred {
    color: #ff3b30;
}
</style>
